/**
 * Copyright (c) 2014 itemis AG (http://www.itemis.eu) and others.
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 * 
 * SPDX-License-Identifier: EPL-2.0
 */
package org.eclipse.xtend.core.tests.compiler;

import org.eclipse.xtend2.lib.StringConcatenation;
import org.junit.Test;

/**
 * @author Anton Kosyakov - Initial contribution and API
 */
@SuppressWarnings("all")
public class CompoundAssignmentOperatorCompilerTest extends AbstractXtendCompilerTest {
  @Test
  public void test_1() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import static extension compound.IntCompoundExtensions.*");
    _builder.newLine();
    _builder.newLine();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i += i *= 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_1 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _multiplyAssign = i = _i_1 *= 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = _i += _multiplyAssign;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_2() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import static extension compound.IntCompoundExtensions.*");
    _builder.newLine();
    _builder.newLine();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i *= i += 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_1 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _add = i = _i_1 += 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = _i *= _add;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_3() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i += i *= 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_1 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _multiply = i = (_i_1 * 2);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = (_i + _multiply);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_4() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i *= i += 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_1 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _plus = i = (_i_1 + 2);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = (_i * _plus);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_5() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import static extension compound.IntCompoundExtensions.*");
    _builder.newLine();
    _builder.newLine();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i *= i -= 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_1 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _minus = i = (_i_1 - 2);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = _i *= _minus;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_6() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import static extension compound.IntCompoundExtensions.*");
    _builder.newLine();
    _builder.newLine();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i -= i *= 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_1 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _multiplyAssign = i = _i_1 *= 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = (_i - _multiplyAssign);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_7() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import static extension compound.IntCompoundExtensions.*");
    _builder.newLine();
    _builder.newLine();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i *= i /= i -= 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import compound.IntCompoundExtensions;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_1 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_2 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _minus = i = (_i_2 - 2);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _divideAssign = i = IntCompoundExtensions.operator_divideAssign(_i_1, _minus);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = _i *= _divideAssign;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_8() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import static extension compound.IntCompoundExtensions.*");
    _builder.newLine();
    _builder.newLine();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i *= i %= i -= 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import compound.IntCompoundExtensions;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_1 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_2 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _minus = i = (_i_2 - 2);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _modulo = i = IntCompoundExtensions.operator_modulo(_i_1, _minus);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = _i *= _modulo;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_9() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i *= 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = (_i * 2);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_10() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import static extension compound.IntCompoundExtensions.*");
    _builder.newLine();
    _builder.newLine();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i *= 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = _i *= 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_11() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i += (3 + (i *= 2))");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_1 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _multiply = i = (_i_1 * 2);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _plus = (3 + _multiply);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = (_i + _plus);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_12() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import static extension compound.IntCompoundExtensions.*");
    _builder.newLine();
    _builder.newLine();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i += (3 + (i *= 2))");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int i = 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _i_1 = i;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _multiplyAssign = i = _i_1 *= 2;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int _plus = (3 + _multiplyAssign);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("i = _i += _plus;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_13() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i += 2");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("private int i = 2;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _i = this.i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return this.i = (_i + 2);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_14() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import static extension compound.IntCompoundExtensions.*");
    _builder.newLine();
    _builder.newLine();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("var i = 2");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def foo() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("i += i *= 2");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("private int i = 2;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int foo() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _i = this.i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _i_1 = this.i;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _multiplyAssign = this.i = _i_1 *= 2;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return this.i = _i += _multiplyAssign;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_15() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("int _a");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("static def withinStaticContext() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("val x = new Foo");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("val y = new Foo");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("x._a += y._a");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("private int _a;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public static int withinStaticContext() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("final Foo x = new Foo();");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("final Foo y = new Foo();");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int __a = x._a;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = x._a = (__a + y._a);");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_16() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("int _a");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def withinInstanceContext() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("val x = new Foo");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("val y = new Foo");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("x._a += y._a");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("private int _a;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int withinInstanceContext() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("final Foo x = new Foo();");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("final Foo y = new Foo();");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int __a = x._a;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = x._a = (__a + y._a);");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_17() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Foo {");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("int _a");
    _builder.newLine();
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def withinInstanceContext() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("val y = new Foo");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("_a += y._a");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Foo {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("private int _a;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public int withinInstanceContext() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("int _xblockexpression = (int) 0;");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("{");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("final Foo y = new Foo();");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("int __a = this._a;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("_xblockexpression = this._a = (__a + y._a);");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("return _xblockexpression;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }
}
